<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 字符集
        console.log(/[abc]/.test("aqwe"));
        console.log(/[abc]/.test("qwe"));
        console.log(/[abc]/.test("qwbe"));
        // 范围类
        console.log(/[0-9]/.test("6"));
        console.log(/[0-9]/.test("a"));
        console.log(/[a-z]/.test("a"));
        console.log(/[A-Z]/.test("a"));
        // 组合类
        console.log(/[0-9a-zA-Z]/.test("d"));
        // 负向类，不满足
        console.log(/[^0-9]/.test("9"));
    </script>
</body>
</html>